﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NETMovie.UI.WebMVC.Models.PaymentModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Make Payment
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Make Payment</h2>

    <% using (Html.BeginForm("MakePayment", "Rental"))
       {%>
        <%: Html.ValidationSummary(false, "The operation is unsuccessful. Please see the errors listed.")%>

        <%: Html.HiddenFor(m => m.TransactionID) %>
        
        <div class="display-label">
            <%: Html.LabelFor(m => m.TransactionNo) %>: <%: Html.DisplayFor(m => m.TransactionNo) %>
            <%: Html.HiddenFor(m => m.TransactionNo) %>
        </div>
        <div class="display-label">
            <%: Html.LabelFor(m => m.TotalAmount) %>: <%: Html.DisplayFor(m => m.TotalAmount, "Currency") %>
            <%: Html.HiddenFor(m => m.TotalAmount) %>
        </div>

        <fieldset>
            <legend>Payment Details</legend>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.PayerFirstName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.PayerFirstName) %>
                <%: Html.ValidationMessageFor(m => m.PayerFirstName) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.PayerLastName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.PayerLastName) %>
                <%: Html.ValidationMessageFor(m => m.PayerLastName) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.AddressLine1) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.AddressLine1) %>
                <%: Html.ValidationMessageFor(m => m.AddressLine1) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.AddressLine2) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.AddressLine2) %>
                <%: Html.ValidationMessageFor(m => m.AddressLine2) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.City) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.City) %>
                <%: Html.ValidationMessageFor(m => m.City) %>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Country) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(m => m.Country, Model.Countries)%>
                <%: Html.ValidationMessageFor(m => m.Country)%>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.PostalCode) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.PostalCode)%>
                <%: Html.ValidationMessageFor(m => m.PostalCode)%>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.CCType) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(m => m.CCType, Model.CCTypes)%>
                <%: Html.ValidationMessageFor(m => m.CCType)%>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.CCNo) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.CCNo)%>
                <%: Html.ValidationMessageFor(m => m.CCNo)%>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(m => m.ExpiryMonth) %> / <%: Html.LabelFor(m => m.ExpiryYear) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(m => m.ExpiryMonth, new { @style="width:50px;" }) %> / <%: Html.TextBoxFor(m => m.ExpiryYear, new { @style="width:80px;" }) %>
                <%: Html.ValidationMessageFor(m => m.ExpiryMonth)%>
                <%: Html.ValidationMessageFor(m => m.ExpiryYear) %>
            </div>
        </fieldset>

        <div>
            <input type="submit" value="Pay!" />
        </div>
    <% } %>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsContent" runat="server">
</asp:Content>
